#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_accept_clicked()
{
    ui->label->setText("女神快乐嘴一个~mua~mua");
}

void Widget::on_pushButton_reject_clicked()
{
    // 获取窗口的宽度和高度
    int width = this->geometry().width();
    int height = this->geometry().height();
    // 重新生成按钮的位置
    int x = rand() % width;
    int y = rand() % height;
    // 设置新的位置
    ui->pushButton_reject->move(x,y);
}
